import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import { Button, Progress } from "vant";
import VueAwesomeSwiper from "vue-awesome-swiper";
import "swiper/swiper-bundle.css";
import "swiper/swiper.less";
import "vant/lib/index.css";
import "@/style/common.css";
import { setToken } from "@/utils/auth";
import utils from '@/utils/utils'
import Vconsole from 'vconsole';
const vConsole = new Vconsole()
Vue.use(vConsole);

if(utils.getUrlKey('token')){
  setToken(utils.getUrlKey('token'))
  window.location.replace(window.location.href.replace(window.location.search,''));
}
Vue.use(Progress);
import { Icon, TreeSelect } from "vant";
import {
  Sticky,
  DropdownMenu,
  DropdownItem,
  List,
  CountDown,
  Radio,
  RadioGroup,
  Dialog,
  Swipe,
  Field,
  Uploader,
  Checkbox,
  SwipeCell,
  Notify,
  Toast,
  Popup,
  Loading
} from "vant";

import { Image as VanImage } from "vant";
Vue.use(Loading);
Vue.use(VueAwesomeSwiper);
Vue.use(SwipeCell);
Vue.use(Popup);
Vue.use(Checkbox);
Vue.use(Toast);
Vue.use(Notify);
Vue.use(Uploader);
Vue.use(Field);
Vue.use(Dialog);
Vue.use(Swipe);
Vue.use(Radio);
Vue.use(RadioGroup);
Vue.use(CountDown);
Vue.use(VanImage);
Vue.use(List);
Vue.use(TreeSelect);
Vue.use(DropdownMenu);
Vue.use(DropdownItem);
Vue.use(Sticky);
Vue.use(Icon);
Vue.use(Button);
Vue.config.productionTip = false;

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount("#app");
